<template>
	<view class="team" :style="{'--color':vuex_config.price}">
		<view class="item" v-for="(item,index) in dataList" :key='index'>
			<view class="item-num">
				<view class="">订单号：{{item.order_no}}</view>
				<view class="price">金额：￥{{item.total_amount}}</view>
			</view>
			<view class="item-name">
				<text>ID：{{item.fk_users_id}}</text>
				<text class="dj">{{item.users_level_name}}</text>
			</view>
			<view class="item-name">
				<text>昵称：{{item.users_nickname}}</text>
				<text class="dj">{{item.users_mobile}}</text>
			</view>
			<view class="item-name">
				<text>收货人：{{item.name}}</text>
				<text class="dj">{{item.mobile}}</text>
			</view>
			<view class="item-phone">地址：{{item.address}}</view>
			<view class="item-phone">下单时间：{{item.date_creation | format}}</view>
		</view>
		<sww-load-more :params="dataListParams"></sww-load-more>
	</view>
</template>

<script>
	import {
		pagingMixin
	} from '@/mixins/sysPaging.js'
	import {formatDate} from '@/utils/moment/index.js'
	export default {
		mixins: [pagingMixin],
		filters:{
			format(time){
				return formatDate(time,'YYYY-MM-DD HH:mm:ss')
			}
		},
		data(){
			return{
				id:''
			}
		},
		onLoad(option) {
			if(option && option.id){
				this.id = option.id
				this.initPage()
			}
			
		},
		onReachBottom(){
			this._load_data({
					data:this.id
				})
		},
		methods:{
			initPage() {
				let params = {
					pay_status: -1,
					business_id: this.vuex_business.pk_id,
				}
				this._init_data('GetUsersOrderList', params,{
					data:this.id
				})
			}
		}
	}
</script>
<style>
	page{
		background-color: #F5F5F5;
	}
</style>
<style lang="scss" scoped>
	.team{
		padding: 20rpx 26rpx 0;
		.item{
			width: 100%;
			border-radius: 20rpx;
			background-color: #fff;
			padding: 20rpx;
			font-size: 24rpx;
			color: #999;
			margin-bottom: 20rpx;
		
			.item-num{
				display: flex;
				align-items: center;
				justify-content: space-between;
				color: #333;
				font-size: 30rpx;
				padding-bottom: 20rpx;
				border-bottom: 1px solid #f1f1f1;
				.price{
					color: var(--color);
				}
			}
			.item-name{
				display: flex;
				align-items: center;
				padding-top: 10rpx;
				.dj{
					padding-left: 20rpx;
				}
			}
			.item-phone{
				padding: 10rpx 0;
			}
		}
	}
	
</style>
